<script>
	$(function() {
		$(".article_footer a.icon_button.modify").click(function() {	
			href = $(this).attr("href");
			title = '{result->mn_name} 메뉴 수정';
			
			
			loadDialogForm(href, null, title, 600, 350, null, 'modify');
			
			return false;
		});
		
		$(".article_footer a.icon_button.delete").click(function() {
			if(confirm('{result->mn_name} 메뉴를 삭제하시겠습니까?')) {
				$.ajax({
					 url : $(this).attr("href")
					,success:function(data){
						if(data.code == mesg.success) {
							if(data.menu_refresh_url) {
								$("aside#left menu").load(data.menu_refresh_url);
							}
							
							sagapo.section_refresh(data.return_url);
						} else {
							alert(data.msg);
						}
						
						return false;
					}
				});
				
			} 
			
			return false;
		});
	});
</script>

<div class="article_header">
	<h4>{result->mn_name} 메뉴 정보</h4>
	<div class="close">
		<button type="button">닫기</button>
	</div>
</div>

<div class="article">
	<table class="table">
		<caption>
			{result->mn_name} 메뉴 정보
		</caption>
		<colgroup>
			<col class="add" />
			<col />
		</colgroup>
		<tbody>
			<tr>
				<th scope="row" class="txt_right br">메뉴 명</th>
				<td>
					<img src="{CFG->PATH->IMAGE}/iconset/{result->mn_icon}" alt="{result->mn_name}" title="{result->mn_name}" />
					{result->mn_name}
				</td>
			</tr>
			<tr>
				<th scope="row" class="txt_right br">URL</th>
				<td>
					<a href="{result->url}" target="_blank">{result->url}</a>
				</td>
			</tr>
			{? result->mn_type}
			<tr>
				<th scope="row" class="txt_right br">type</th>
				<td>
					{result->mn_type}
				</td>
			</tr>
			{/}
			{? result->mn_num}
			<tr>
				<th scope="row" class="txt_right br">num</th>
				<td>
					{result->mn_num}
				</td>
			</tr>
			{/}
			{? result->mn_external}
			<tr>
				<th scope="row" class="txt_right br">새창</th>
				<td>
					새창
				</td>
			</tr>
			{/}
			<tr>
				<th scope="row" class="txt_right br">정렬값</th>
				<td>
					{result->mn_order}
				</td>
			</tr>
			<tr>
				<th scope="row" class="txt_right br">타입</th>
				<td>
					{? result->mn_admin}
						<span class="blue">일반</span>
					{:}
						<span class="red">관리자 전용</span>
					{/}
				</td>
			</tr>
		</tbody>
	</table>
</div>

<div class="article_footer">
	<div class="btn_left">
		<a href="{action}/view/{result->mn_seq}" class="icon_button refresh" title="새로고침">새로고침</a>
	</div>
	
	<div class="btn_right">
		<a href="{action}/modify/{result->mn_seq}" class="icon_button modify" title="수정">수정</a>
		{? result->mn_delete}
		<a href="{action}/doDelete/{result->mn_seq}" class="icon_button delete" title="삭제">삭제</a>
		{/}
	</div>
</div>